package com.gymmsystem.GYMMSystem.service;

import com.gymmsystem.GYMMSystem.entity.Reservation;
import com.gymmsystem.GYMMSystem.dto.UserReservationDTO;
import java.util.List;
import java.util.Map;

public interface ReservationService {
    List<Map<String, Object>> getUserReservations(Long userId);
    
    /**
     * 获取用户预约DTO列表
     * @param userId 用户ID
     * @return 用户预约DTO列表
     */
    List<UserReservationDTO> getUserReservationsDTO(Long userId);
    List<Map<String, Object>> getCoachReservations(Long coachId);
    Reservation getReservationById(Long reservationId);
    boolean createReservation(Reservation reservation);
    boolean updateReservation(Reservation reservation);
    boolean cancelReservation(Long reservationId, String reason);
    boolean confirmReservation(Long reservationId);
    boolean completeReservation(Long reservationId);
    boolean checkUserCourseReservation(Long userId, Long courseId);
    int getActiveReservationsCount(Long courseId);
    // 统计待确认预约总数
    Long countPendingReservations();
    Long countActiveReservations();
    
    // 批量确认所有待确认预约
    Integer confirmAllPendingReservations();
    // 获取所有预约列表（非取消状态）
    List<Map<String, Object>> getAllActiveReservations();
    // 获取取消预约列表
    List<Map<String, Object>> getCancelledReservations();
    
    // 分页获取活跃预约列表
    Map<String, Object> getActiveReservationsByPage(Integer page, Integer size);
    
    // 分页获取取消预约列表
    Map<String, Object> getCancelledReservationsByPage(Integer page, Integer size);
}